import request from '@/utils/request'

export function addDocs (data,method) { //新增文章
  return request({
    url: '/cms/docs',
    method: method,
    data
  })
}





// *********************************************
export function docsList (data) { //文章列表
  JSON.stringify(data)
  return request({
    url: '/cms/docs',
    method: 'get',
    params : data
  })
}
export function compileDocs (data) { //修改文章
  return request({
    url: '/cms/docs',
    method: 'put',
    data
  })
}
export function getDocs (id) {
  return request({
    url: '/cms/docs/'+ id,
    method: 'get',
  })
}
export function delDocs (docsId) { //删除文章
  return request({
    url: '/cms/docs/'+docsId,
    method: 'DELETE',
  })
}
